home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / g_quake / ultqsrc.zip / OLDONE.QC < prev    next >
Text File  |  1996-09-12  |  10KB  |  276 lines

  1. /*
  2. ==============================================================================
  3.  
  4. OLD ONE
  5.  
  6. ==============================================================================
  7. */
  8. $cd /raid/quake/id1/models/old_one
  9. $origin 0 0 24
  10. $base base
  11. $skin skin
  12. $scale 1
  13.  
  14. void() finale_1;
  15. void() finale_2;
  16. void() finale_3;
  17. void() finale_4;
  18.  
  19.  
  20. entity    shub;
  21.  
  22. $frame old1 old2 old3 old4 old5 old6 old7 old8 old9 
  23. $frame old10 old11 old12 old13 old14 old15 old16 old17 old18 old19 
  24. $frame old20 old21 old22 old23 old24 old25 old26 old27 old28 old29 
  25. $frame old30 old31 old32 old33 old34 old35 old36 old37 old38 old39 
  26. $frame old40 old41 old42 old43 old44 old45 old46 
  27.  
  28. $frame shake1 shake2 shake3 shake4 shake5 shake6 shake7 shake8
  29. $frame shake9 shake10 shake11 shake12 shake12 shake13 shake14
  30. $frame shake15 shake16 shake17 shake18 shake19 shake20
  31.  
  32. //void() old_stand     =[      $old1,       old_stand    ] {};
  33.  
  34. void() old_idle1        =[      $old1,  old_idle2       ] {};
  35. void() old_idle2        =[      $old2,  old_idle3       ] {};
  36. void() old_idle3        =[      $old3,  old_idle4       ] {};
  37. void() old_idle4        =[      $old4,  old_idle5       ] {};
  38. void() old_idle5        =[      $old5,  old_idle6       ] {};
  39. void() old_idle6        =[      $old6,  old_idle7       ] {};
  40. void() old_idle7        =[      $old7,  old_idle8       ] {};
  41. void() old_idle8        =[      $old8,  old_idle9       ] {};
  42. void() old_idle9        =[      $old9,  old_idle10      ] {};
  43. void() old_idle10       =[      $old10, old_idle11      ] {};
  44. void() old_idle11       =[      $old11, old_idle12      ] {};
  45. void() old_idle12       =[      $old12, old_idle13      ] {};
  46. void() old_idle13       =[      $old13, old_idle14      ] {};
  47. void() old_idle14       =[      $old14, old_idle15      ] {};
  48. void() old_idle15       =[      $old15, old_idle16      ] {};
  49. void() old_idle16       =[      $old16, old_idle17      ] {};
  50. void() old_idle17       =[      $old17, old_idle18      ] {};
  51. void() old_idle18       =[      $old18, old_idle19      ] {};
  52. void() old_idle19       =[      $old19, old_idle20      ] {};
  53. void() old_idle20       =[      $old20, old_idle21      ] {};
  54. void() old_idle21       =[      $old21, old_idle22      ] {};
  55. void() old_idle22       =[      $old22, old_idle23      ] {};
  56. void() old_idle23       =[      $old23, old_idle24      ] {};
  57. void() old_idle24       =[      $old24, old_idle25      ] {};
  58. void() old_idle25       =[      $old25, old_idle26      ] {};
  59. void() old_idle26       =[      $old26, old_idle27      ] {};
  60. void() old_idle27       =[      $old27, old_idle28      ] {};
  61. void() old_idle28       =[      $old28, old_idle29      ] {};
  62. void() old_idle29       =[      $old29, old_idle30      ] {};
  63. void() old_idle30       =[      $old30, old_idle31      ] {};
  64. void() old_idle31       =[      $old31, old_idle32      ] {};
  65. void() old_idle32       =[      $old32, old_idle33      ] {};
  66. void() old_idle33       =[      $old33, old_idle34      ] {};
  67. void() old_idle34       =[      $old34, old_idle35      ] {};
  68. void() old_idle35       =[      $old35, old_idle36      ] {};
  69. void() old_idle36       =[      $old36, old_idle37      ] {};
  70. void() old_idle37       =[      $old37, old_idle38      ] {};
  71. void() old_idle38       =[      $old38, old_idle39      ] {};
  72. void() old_idle39       =[      $old39, old_idle40      ] {};
  73. void() old_idle40       =[      $old40, old_idle41      ] {};
  74. void() old_idle41       =[      $old41, old_idle42      ] {};
  75. void() old_idle42       =[      $old42, old_idle43      ] {};
  76. void() old_idle43       =[      $old43, old_idle44      ] {};
  77. void() old_idle44       =[      $old44, old_idle45      ] {};
  78. void() old_idle45       =[      $old45, old_idle46      ] {};
  79. void() old_idle46       =[      $old46, old_idle1       ] {};
  80.  
  81.  
  82. void() old_thrash1        =[ $shake1,  old_thrash2       ] {lightstyle(0, "m");};
  83. void() old_thrash2        =[      $shake2,  old_thrash3       ] {lightstyle(0, "k");};
  84. void() old_thrash3        =[      $shake3,  old_thrash4       ] {lightstyle(0, "k");};
  85. void() old_thrash4        =[      $shake4,  old_thrash5       ] {lightstyle(0, "i");};
  86. void() old_thrash5        =[      $shake5,  old_thrash6       ] {lightstyle(0, "g");};
  87. void() old_thrash6        =[      $shake6,  old_thrash7       ] {lightstyle(0, "e");};
  88. void() old_thrash7        =[      $shake7,  old_thrash8       ] {lightstyle(0, "c");};
  89. void() old_thrash8        =[      $shake8,  old_thrash9       ] {lightstyle(0, "a");};
  90. void() old_thrash9        =[      $shake9,  old_thrash10      ] {lightstyle(0, "c");};
  91. void() old_thrash10       =[      $shake10, old_thrash11      ] {lightstyle(0, "e");};
  92. void() old_thrash11       =[      $shake11, old_thrash12      ] {lightstyle(0, "g");};
  93. void() old_thrash12       =[      $shake12, old_thrash13      ] {lightstyle(0, "i");};
  94. void() old_thrash13       =[      $shake13, old_thrash14      ] {lightstyle(0, "k");};
  95. void() old_thrash14       =[      $shake14, old_thrash15      ] {lightstyle(0, "m");};
  96. void() old_thrash15       =[      $shake15, old_thrash16      ] {lightstyle(0, "m");
  97. self.cnt = self.cnt + 1;
  98. if (self.cnt != 3)
  99.     self.think = old_thrash1;
  100. };
  101. void() old_thrash16       =[      $shake16, old_thrash17      ] {lightstyle(0, "g");};
  102. void() old_thrash17       =[      $shake17, old_thrash18      ] {lightstyle(0, "c");};
  103. void() old_thrash18       =[      $shake18, old_thrash19      ] {lightstyle(0, "b");};
  104. void() old_thrash19       =[      $shake19, old_thrash20      ] {lightstyle(0, "a");};
  105. void() old_thrash20       =[      $shake20, old_thrash20      ] {finale_4();};
  106.  
  107. //============================================================================
  108.  
  109. void() finale_1 =
  110. {
  111.     local entity    pos, pl;
  112.     local entity    timer;
  113.  
  114.     intermission_exittime = time + 10000000;    // never allow exit
  115.     intermission_running = 1;
  116.  
  117.     // find the intermission spot
  118.     pos = find (world, classname, "info_intermission");
  119.     if (!pos)
  120.         error ("no info_intermission");
  121.     pl = find (world, classname, "misc_teleporttrain");
  122.     if (!pl)
  123.         error ("no teleporttrain");
  124.     remove (pl);
  125.  
  126.     WriteByte (MSG_ALL, SVC_FINALE);
  127.     WriteString (MSG_ALL, "");
  128.  
  129.     pl = find (world, classname, "player");
  130.     while (pl != world)
  131.     {
  132.         pl.view_ofs = '0 0 0';
  133.         pl.angles = other.v_angle = pos.mangle;
  134.         pl.fixangle = TRUE;        // turn this way immediately
  135.         pl.map = self.map;
  136.         pl.nextthink = time + 0.5;
  137.         pl.takedamage = DAMAGE_NO;
  138.         pl.solid = SOLID_NOT;
  139.         pl.movetype = MOVETYPE_NONE;
  140.         pl.modelindex = 0;
  141.         setorigin (pl, pos.origin);
  142.         pl = find (pl, classname, "player");
  143.     }    
  144.     
  145.     // make fake versions of all players as standins, and move the real
  146.     // players to the intermission spot
  147.     
  148.     // wait for 1 second
  149.     timer = spawn();
  150.     timer.nextthink = time + 1;
  151.     timer.think = finale_2;    
  152. };
  153.  
  154. void() finale_2 =
  155. {
  156.     local vector    o;
  157.  
  158.     // start a teleport splash inside shub
  159.  
  160.     o = shub.origin - '0 100 0';
  161.     WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
  162.     WriteByte (MSG_BROADCAST, TE_TELEPORT);
  163.     WriteCoord (MSG_BROADCAST, o_x);
  164.     WriteCoord (MSG_BROADCAST, o_y);
  165.     WriteCoord (MSG_BROADCAST, o_z);
  166.  
  167.         sound (shub, CHAN_VOICE, "misc/r_tele1.wav", 1, ATTN_NORM);
  168.     
  169.     self.nextthink = time + 2;
  170.     self.think = finale_3;
  171. };
  172.  
  173. void() finale_3 =
  174. {
  175.     // start shub thrashing wildly
  176.     shub.think = old_thrash1;
  177.     sound (shub, CHAN_VOICE, "boss2/death.wav", 1, ATTN_NORM);
  178.     lightstyle(0, "abcdefghijklmlkjihgfedcb");    
  179. };
  180.  
  181. void() finale_4 =
  182. {
  183.     // throw tons of meat chunks    
  184.     local    vector    oldo;
  185.     local    float    x, y, z;
  186.     local    float    r;
  187.     local entity    n;
  188.  
  189.     sound (self, CHAN_VOICE, "boss2/pop2.wav", 1, ATTN_NORM);
  190.     
  191.     oldo = self.origin;
  192.  
  193.     z = 16;
  194.     while (z <= 144)
  195.     {
  196.         x = -64;
  197.         while (x <= 64)
  198.         {
  199.             y = -64;
  200.             while (y <= 64)
  201.             {
  202.                 self.origin_x = oldo_x + x;
  203.                 self.origin_y = oldo_y + y;
  204.                 self.origin_z = oldo_z + z;
  205.  
  206.                 r = random();
  207.                 if (r < 0.3)                
  208.                     ThrowGib ("progs/gib1.mdl", -999);
  209.                 else if (r < 0.6)
  210.                     ThrowGib ("progs/gib2.mdl", -999);
  211.                 else
  212.                     ThrowGib ("progs/gib3.mdl", -999);
  213.                 y = y + 32;
  214.             }
  215.             x = x + 32;
  216.         }
  217.         z = z + 96;
  218.     }
  219.     // start the end text
  220.     WriteByte (MSG_ALL, SVC_FINALE);
  221.     WriteString (MSG_ALL, "Congratulations and well done! You have\nbeaten the hideous Shub-Niggurath, and\nher hundreds of ugly changelings and\nmonsters. You have proven that your\nskill and your cunning are greater than\nall the powers of Quake. You are the\nmaster now. Id Software salutes you.");
  222.  
  223. // put a player model down
  224.     n = spawn();
  225.     setmodel (n, "progs/player.mdl");
  226.     oldo = oldo - '32 264 0';
  227.     setorigin (n, oldo);
  228.     n.angles = '0 290 0';
  229.     n.frame = 1;
  230.  
  231.     remove (self);
  232.  
  233. // switch cd track
  234.     WriteByte (MSG_ALL, SVC_CDTRACK);
  235.     WriteByte (MSG_ALL, 3);
  236.     WriteByte (MSG_ALL, 3);
  237.     lightstyle(0, "m");    
  238. };
  239.  
  240. //============================================================================
  241.  
  242.  
  243. /*QUAKED monster_oldone (1 0 0) (-16 -16 -24) (16 16 32)
  244. */
  245. void() monster_oldone =
  246. {
  247.         if (deathmatch)
  248.     {
  249.         remove(self);
  250.         return;
  251.     }
  252.  
  253.     precache_model2 ("progs/oldone.mdl");
  254.  
  255.     precache_sound2 ("boss2/death.wav");
  256.     precache_sound2 ("boss2/idle.wav");
  257.     precache_sound2 ("boss2/sight.wav");
  258.     precache_sound2 ("boss2/pop2.wav");
  259.  
  260.     self.solid = SOLID_SLIDEBOX;
  261.     self.movetype = MOVETYPE_STEP;
  262.     
  263.     setmodel (self, "progs/oldone.mdl");
  264.     setsize (self, '-160 -128 -24', '160 128 256');
  265.  
  266.     self.health = 40000;        // kill by telefrag
  267.     self.think = old_idle1;
  268.     self.nextthink = time + 0.1;    
  269.     self.takedamage = DAMAGE_YES;
  270.     self.th_die = finale_1;
  271.     shub = self;
  272.         self.active = -1;
  273.     
  274.     total_monsters = total_monsters + 1;
  275. };
  276.